package br.com.ifactory.tools;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/*
 * @author Alexandro Felix
 */
public class DateTest {
    
    public static void testDate(String[] args){
        
        String sDate = "Mon Sep  5 18:49:24 2011";
        String pattern = "E MMM  d hh:mm:ss yyyy";
        SimpleDateFormat format = new SimpleDateFormat(pattern);
        Date date = null;
        try{
            date = format.parse(sDate);
            System.out.println(date);
            
        }catch(ParseException pe){
            pe.printStackTrace();
        }
        System.out.println(format.format(date));        
    }
    
}
